/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package horizon.component;

import horizon.graphics.RenderingContext;

/**
 *
 * @author J_Laptop
 */
public class StaticRender extends RenderComponent{

    String textureName = "";
    float scale = 1;
    
    public StaticRender(String id , String textureName){
        super(id);
        
        this.textureName = textureName;
        
    }
    
    public void setTexture(String i){
        
        textureName = i;
        
    }
    @Override
    public void render(RenderingContext r) {
        
        r.drawImage(textureName, r.WorldToScreenCoordinates(owner.getPosition()), 0, scale);
        
    }

    @Override
    public void update(long elapsedTime) {
        
    }

    public float getScale() {
        return scale;
    }

    public void setScale(float scale) {
        this.scale = scale;
    }

    
    
    
}
